<?php
/**
 * Created by PhpStorm.
 * User: zhouxin
 * Date: 2018/10/7
 * Time: 16:31
 */


include "config.php";
$query = "DELETE  FROM cart WHERE user_id=? AND pro_id=?;";
$stmt = $conn->prepare($query);
$stmt->bind_param("ii", $_POST["user_id"], $_POST["pro_id"]);
$stmt->execute();
$queryResult = $stmt->get_result();
if ($queryResult->num_rows >= 1) {
    print_r(json_encode(array("status" => 1, "msg" => "删除成功")));
}
else print_r(json_encode(array("status" => 0, "msg" => "删除失败")));